import request from "./request";

export function login(data){
    return request.post('/user/user/login',data)
}

export function regist(data){
    return request.post('/user/user/save',data)
}

// 查询用户收获地址
export function getAddr(id){
    return request.get(`/user/addressBook/list/${id}`)
}
// 新增收货地址
export function addAddr(obj){
    return request.post('/user/addressBook',obj)
}
// 修改收货地址
export function modifyAddr(obj){
    return request.put('/user/addressBook',obj)
}
// 删除收货地址
export function delAddr(id){
    return request.delete(`/user/addressBook/delete/${id}`)
}
// 设置默认收货地址
export function setDefaultAddr(id){
    return request.post(`/user/addressBook/default/${id}`)
}